<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>    

<c:set var="contextPath" value="${pageContext.request.contextPath}" />

<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.1//EN" "http://www.wapforum.org/DTD/xhtml-mobile11.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, width=device-width, target-densitydpi=medium-dpi" />
	<title>인권과 평화의 대학 - 성공회대학교</title>
	<link rel="stylesheet" href="${contextPath}/css/common/layout.css" type="text/css" />
	<script type="text/javascript" src="${contextPath}/js/common/lib/jquery-1.6.4.js"></script>
	<script type="text/javascript" src="${contextPath}/js/common/menu.js"></script>
	<link rel="stylesheet" href="${contextPath}/css/notice_list.css" type="text/css" />
	<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-32515688-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</head>
<body>
	
	<!-- 상단영역 -->
	<jsp:include page="./common/header.jsp" />
	
	
	<!-- 가운데영역 -->
	<div id="center">
		
		<!-- 공통 네비게이션 -->
		<h2>
			<span class="nav_step_1">느티아래</span>
			<span class="nav_step_2">알림마당</span>
			<span class="nav_step_3">
				<c:choose>
					<c:when test="${menu == 'undergraduate_notice'}">학사공지</c:when>
					<c:when test="${menu == 'class_notice'}">수업공지</c:when>
					<c:when test="${menu == 'scholarship_notice'}">장학공지</c:when>
					<c:when test="${menu == 'general_notice'}">일반공지</c:when>
					<c:when test="${menu == 'event_notice'}">행사공지</c:when>
					<c:when test="${menu == 'free_board'}">커뮤니티 <span class="nav_step_4">자유게시판</span></c:when>
					<c:when test="${menu == 'employment'}">커뮤니티 <span class="nav_step_4">취업정보</span></c:when>
					<c:when test="${menu == 'registrar'}">학사종합 Q&A  <span class="nav_step_4">교무처</span></c:when>
					<c:when test="${menu == 'gyohakcheo'}">학사종합 Q&A  <span class="nav_step_4">대학원 교학처</span></c:when>
					<c:when test="${menu == 'exchange_service'}">학사종합 Q&A  <span class="nav_step_4">학생교류처</span></c:when>
					<c:when test="${menu == 'secretary'}">학사종합 Q&A  <span class="nav_step_4">총무처</span></c:when>
					<c:when test="${menu == 'computer_center'}">학사종합 Q&A  <span class="nav_step_4">전자계산소</span></c:when>
					<c:when test="${menu == 'inconvenience'}">학사종합 Q&A  <span class="nav_step_4">불편사항접수</span></c:when>
					<c:when test="${menu == 'intern'}">인재채용  <span class="nav_step_4">인턴/근로</span></c:when>
					<c:when test="${menu == 'country'}">인재채용  <span class="nav_step_4">국가근로</span></c:when>
					<c:when test="${menu == 'research'}">인재채용  <span class="nav_step_4">연구인력</span></c:when>
					<c:when test="${menu == 'techers'}">인재채용  <span class="nav_step_4">교원</span></c:when>
					<c:when test="${menu == 'staff'}">인재채용  <span class="nav_step_4">직원</span></c:when>
					<c:when test="${menu == 'form'}">각종양식 </c:when>
				</c:choose>
			</span>
		</h2>
		<!-- 공통 부분 -->
		
		<c:if test="${isSearchBun}">
			<div id="searchBun">
				<c:choose>
					<c:when test="${searchBun == searchBun1}">
						<a class="select_1" href="${contextPath}/${menu}/list.do?searchBun=${searchBun1}">대학</a>
					</c:when>
					<c:otherwise>
						<a href="${contextPath}/${menu}/list.do?searchBun=${searchBun1}">대학</a>
					</c:otherwise>
				</c:choose>
				<c:choose>
					<c:when test="${searchBun == searchBun2}">
						<a class="select_2" href="${contextPath}/${menu}/list.do?searchBun=${searchBun2}">대학원</a>
					</c:when>
					<c:otherwise>
						<a href="${contextPath}/${menu}/list.do?searchBun=${searchBun2}">대학원</a>
					</c:otherwise>
				</c:choose>
			</div>
		</c:if>
		
		<div id="list">
			<c:choose>
				<c:when test="${listSize > 0}">
					<c:forEach items="${valueList}" var="valueList">
						<a class="content_list" href="${contextPath}/${menu}/view.do?idx=${valueList.idx}&amp;searchBun=${searchBun}&amp;curPage=${paggingUtil.curPage}&amp;searchType=${searchType}&amp;searchWord=${searchWord}">${valueList.text} <span class="name">[${valueList.name} | ${valueList.todayDate}]</span></a>
					</c:forEach> 
				</c:when>
				<c:otherwise>
						<a class="content_list" href="${contextPath}/${menu}/list.do">검색 결과가 없습니다.</a>
				</c:otherwise>
			</c:choose>
		</div>
		
		<div id="pagging">
			<a class="first" href="${contextPath}/${menu}/list.do?searchBun=${searchBun}&amp;curPage=${paggingUtil.first}&amp;searchType=${searchType}&amp;searchWord=${searchWord}">
				<img src="${contextPath}/img/common/board/first.gif" alt="첫 페이지" />
			</a>
			<a class="prev" href="${contextPath}/${menu}/list.do?searchBun=${searchBun}&amp;curPage=${paggingUtil.prev}&amp;searchType=${searchType}&amp;searchWord=${searchWord}">
				<img src="${contextPath}/img/common/board/prev.gif" alt="이전 페이지" />
			</a>
			
			<c:forEach begin="${paggingUtil.beginPage}" end="${paggingUtil.endPage}" var="num">
				<c:choose>
					<c:when test="${paggingUtil.curPage == num}">
						<a class="curPage" href="${contextPath}/${menu}/list.do?searchBun=${searchBun}&amp;curPage=${num}&amp;searchType=${searchType}&amp;searchWord=${searchWord}">${num}</a>				
					</c:when>
					<c:otherwise>
						<a class="page" href="${contextPath}/${menu}/list.do?searchBun=${searchBun}&amp;curPage=${num}&amp;searchType=${searchType}&amp;searchWord=${searchWord}">${num}</a>
					</c:otherwise>
				</c:choose>
			</c:forEach> 
			
			<a class="next" href="${contextPath}/${menu}/list.do?searchBun=${searchBun}&amp;curPage=${paggingUtil.next}&amp;searchType=${searchType}&amp;searchWord=${searchWord}">
				<img src="${contextPath}/img/common/board/next.gif" alt="다음 페이지" />
			</a>
			<a class="last" href="${contextPath}/${menu}/list.do?searchBun=${searchBun}&amp;curPage=${paggingUtil.last}&amp;searchType=${searchType}&amp;searchWord=${searchWord}">
				<img src="${contextPath}/img/common/board/last.gif" alt="마지막 페이지" />
			</a>
			
		</div> 
		
		<div id="search">
			<form action="${contextPath}/${menu}/list.do" method="post">
				<input type="hidden" name="searchBun" value="${searchBun}" />
				
				<select id="searchType" name="searchType">
					<c:choose>
						<c:when test="${searchType == '1'}">
							<option value="1" selected="selected">제목</option>
							<option value="2">내용</option>
						</c:when>
						<c:otherwise>
							<option value="1">제목</option>
							<option value="2" selected="selected">내용</option>
						</c:otherwise>
					</c:choose>
				</select>
				
				<input type="text" id="searchWord" name="searchWord" value="${searchWord}" />
				<input type="submit" id="submit" value="확인" />
			</form>
		</div>
		
	</div>
	
	<!-- 하단영역 -->
	<jsp:include page="./common/footer.jsp" />
	
</body>
</html>